1. Field of the Invention
This invention relates to a positioning apparatus which controls motors, such as servo motors, and particularly to a positioning apparatus which exercises synchronous control by means of only motors without using any mechanisms, such as coupling shafts, clutches, gears and cams.
2. Description of the Background Art
Conventional art examples will be described with reference to the drawings. FIG. 24 is a general arrangement diagram showing the system configuration of a positioning controller, wherein the numeral 500 indicates a positioning controller, 501a, 501b, 501c and 501d designate servo amplifiers, 502a, 502b, 502c and 502d denote servo motors, 503 represents a position detector, such as an encoder, which detects the position of any machine, 504 indicates a sequence controller which transfers information, such as variables, to and from the positioning controller 500, 505 denotes a peripheral device which performs the programming and monitoring of the positioning controller 500, 506 represents a CPU which executes positioning arithmetic, 507 designates an O/S ROM which stores an O/S for operating the positioning controller 500, 508 indicates a program memory which stores application programs, 509 represents a work memory of the CPU 506, 510 denotes a variable memory which stores parameters and other data required for positioning, 511 designates a communication interface between the sequence controller 504 and the positioning controller 500, 512 indicates a peripheral device interface between the peripheral device 505 and the positioning controller 500, 513 denotes a position detection interface used to enter the output of the position detector 503 into the positioning controller 500, 514 represents a servo amplifier interface between the servo amplifiers 501a, 501b, 501c and 501d and the positioning controller 500, and 515 designates an input/output interface which transfers signals to and from an external device.
FIG. 40 gives a combination example of program modules which output position information to the servo amplifiers 501a to 501d in FIG. 24 using software modules (programs) in Embodiment 1 of Japanese Laid-Open Patent Publication No. HEI05073147, wherein 800 indicates a drive software module (hereinafter referred to as the "virtual drive module") which generates and outputs position information referenced for driving the servo motors, 801 denotes a coupling shaft software module (hereinafter referred to as the "virtual coupling shaft") which synchronizes a plurality of servo motors, or a program used to transmit the output information of the virtual drive module 800, 802, 803, 804 and 805 designate blocks 1 to 4, each representing a block of software modules for a single axis, 806, 808, 811 and 813 indicate transmission software modules (hereinafter referred to as the "virtual transmission modules"), each representing the equivalent for the mechanical transmission means of a gear with software, or programs which transmit the information of the virtual coupling shaft, 809 and 814 denote virtual transmission modules equivalent to clutches, 815 designates a virtual transmission module equivalent to a reduction gear, and 807, 810, 812 and 816 represent output software modules (hereinafter referred to as the "output modules") which output commands to the servo motors.
Operation will now be described with reference to FIG. 24. The positioning controller 500 gives position command values to the servo amplifiers 501a to 501d. The servo amplifiers 501a to 501d control the servo motors 502a to 502d in accordance with said position command values. Also, it is assumed that said four servo motors 502a to 502d are required to operate in synchronization with each other.
Supposing that the output module 807 in FIG. 40 is the software module that gives a command to the servo amplifier 501a, the output module 810 to the servo amplifier 501b, the output module 812 to the servo amplifier 501c, and the output module 816 to the servo amplifier 501d, the servo motors 502a to 502d operate in synchronization with each other in accordance with the position information of the mechanically non-existing virtual coupling shaft which has been generated by the virtual drive module 800.
The conventional virtual transmission modules will now be described with reference to the drawings.
First a first conventional example will be described. FIGS. 25 and 26 show a virtual transmission module equivalent to a power transmission mechanisms clutch (hereinafter referred to as the "virtual clutch module") defined in Embodiment 9 of Japanese Laid-Open Patent Publication No. HEI05073147. FIG. 25 is a memory map of the virtual clutch module stored in the program memory. In FIG. 25, 550 indicates a module number area, 551 designates a connection information area stored with the identification information of the other virtual mechanical module which stores input axis position address data required when the virtual clutch module executes arithmetic processing, and 552 denotes an auxiliary input axis connection information area stored with the information of "No" for the virtual clutch module. 570 represents an area stored with an arithmetic expression executed by the virtual clutch module, and 571 indicates a variable area which is not used by the virtual clutch module. 572 and 573 store parameters or the ON address information and OFF address information of the virtual clutch module. Here, the ON address information and OFF address information indicate addresses relative to input axis position address data.
FIG. 26 shows the map of the work memory which saves data required when the virtual clutch module executes arithmetic, wherein 574 and 575 indicate preceding and current input axis position address data value x(n-1) and x(n) areas, respectively, 576 and 577 designate preceding and current output axis position address data value y(n-1) and y(n) areas, respectively, and 578 denotes a virtual clutch module ON/OFF command information area.
The real-time interrupt processing operation of the virtual clutch module will now be described with reference to FIG. 27. When the virtual clutch module is executed, the input axis position address data is read in accordance with the connection information 551 and stored into the x(n) area 575 at step S1570. Subsequently, at step S1571, the ON address command information 572 of the virtual clutch module is read and compared with said x(n). If x(n) is smaller, the information is judged as a clutch OFF region and the operation jumps to step S1574. If not, the execution advances to step S1572, where the OFF address command information 573 is read and compared with said x(n). If x(n) is smaller, the information is judged as a clutch ON region, ON/OFF command data h=1 is stored into the virtual clutch module ON/OFF command area 578 at step S1573, and the processing jumps to step S1575. If the information was judged as the clutch OFF region as a result of said comparison, ON/OFF command data h=0 is stored at step S1574 and the execution jumps to step S1575.
Then, at step S1575, the following expression is executed to calculate the current output axis position address data value y(n): EQU y(n)=[x(n)-x(n31 1)].multidot.h+y(n-1)
Here the value of the virtual clutch module ON/OFF command data h is 1 or 0. Hence, if that value is 1, the result of adding the difference of x(n)-x(n-1) to the preceding output axis address data value y(n-1) is the output of the virtual clutch module. If that value is 0, the preceding output axis address data value y(n-1) is used and kept unchanged as the output of the virtual clutch module.
Subsequently, at steps S1576 and S1577, the current input axis position address data value x(n) is transferred to the preceding input axis position address data value x(n-1) and the current output axis position address data value y(n) is transferred to the preceding output axis position address data value y(n-1) to prepare for the next arithmetic process. Finally, at step S1578, the current output axis position address data value y(n) calculated at step S1575 is provided as the output of the virtual clutch module and stored into the current output axis position address data value area 577, and the operation is terminated. The processing of the flowchart in FIG. 27 is executed in real time to output consecutive position address data.
FIG. 28 shows an operation example of the virtual clutch module. Assuming that A1 is an address at which the clutch is switched on (581a) and B1 is an address at which the clutch is switched off with respect to the input axis position address data X(n), the virtual clutch module ON/OFF command h (582a) is 1 (ON) from a point when the input axis position address data (580) matches A1 to a point just before the same matches B1. Between these points, the output y(n) changes in response to the variation of the input axis position address data. When the virtual clutch module ON/OFF command h (582a) is 0 (OFF), the input y(n) remains unchanged and is kept available if the input axis position address data changes (583).
When it is desired to repeat one cycle of output operation in interval N shown in the figure, for example, and it is assumed that A2 and B2 are a clutch ON address (581c) and a clutch OFF address (581d) commanded in the next cycle, respectively, the arithmetic of A2=A1+N and B2=B1+N must be done by a user sequence program, the input axis position addresses of A2 and B2 commanded again by a programmable controller after the clutch OFF address in one cycle is passed, and this operation repeated thereafter.
Also when it is desired to synchronize a plurality of axes, which are different in clutch ON and OFF addresses, i.e., different in output y(n), to perform one cycle of operation, the arithmetic process must be performed by the user sequence program and commanded again for the number of such axes.
A second conventional art example will now be described with the drawings. FIGS. 29 to 33 show a conventional virtual transmission module equivalent to a cam (hereinafter referred to as the "virtual cam module") which was defined in Japanese Laid-Open Patent Publication No. HEI05073147. FIG. 29 illustrates the virtual cam module, wherein 600 indicates an input axis, 601 designates an auxiliary input axis, 602 denotes an output axis, 620a represents a stroke set value h1, 620b indicates a stroke minimum limit position set value h2, and 604 denotes a black box which contains functions (procedures).
FIG. 30 is a memory map showing how a cam geometry data table is stored into the program memory, wherein 605 indicates position addresses within one revolution of the virtual cam shaft, and 621 represents movement values of a cam corresponding to said position addresses. The movement values of the cam are the values of positions where a stroke bottom dead center is defined as 0 and a stroke top dead center as 1 and change between 0 and 1 within one revolution of the virtual cam shaft. The position addresses within one revolution of the virtual cam shaft are angles equally spaced in one revolution. (e.g., 2000 addresses).
FIGS. 31 and 32 are flowcharts which represent functions (procedures) included in the black box 604.
FIG. 33 is a memory map showing how the virtual cam module is stored into the program memory, wherein 610 indicates a module number and 611 designates connection information which indicates the position address of the input axis. 612 denotes auxiliary input axis connection information which is operative to refer to the position address of the auxiliary input axis. 622 represents arithmetic expressions which are used to find a positioning value output to the output axis 602 and into which the functions (procedures) shown in the flowcharts of FIGS. 31 and 32 are stored. 623 indicates a variable area where the stroke set value 620a and the stroke minimum limit position set value 620b are stored.
Operation will now be described. The virtual cam module shown in FIG. 29 has the position address of the input axis 600 as a main input and the position address of the auxiliary input axis 601 as an auxiliary input. A position address from the other virtual mechanical modules is entered into the input axis 600 as the rotation position information of the virtual cam shaft. Also, the command address of the operation described in a position program is entered into the auxiliary input axis 601 as an offset value to compensate for the rotation position information of the virtual cam shaft entered from the input axis 600.
From these inputs, the stroke set value h1 and stroke minimum limit position set value h2 stored beforehand in the variable area, and the cam geometry data table stored in the program memory as shown in FIG. 30, the virtual cam module calculates a positioning value for reciprocating cam movement and outputs the result of calculation to the output axis 602. The positioning value output for the reciprocating cam movement is transferred to the output module connected next to the output axis to drive the servo motor.
The way of calculating the positioning value output for reciprocating cam movement, which is included in the black box as functions (procedures), will now be described with reference to the flowcharts in FIGS. 31 and 32. In FIG. 31, the position address x of the input axis and the position address z of the auxiliary input axis are first imported (S1620), and the sum thereof is then converted into the position address within one revolution (S1621). The position address within one revolution is represented by a remainder which is obtained by dividing the sum of the position address of the input axis and the position address of the auxiliary input axis by a one-revolution value (360.degree.). The value thus found is the rotation position information of the virtual cam shaft. Subsequently, the movement value of the cam corresponding to the rotation position information is found with reference to the cam geometry data table (S1622). This procedure is detailed in FIG. 32.
In FIG. 32, the position address within one revolution of the virtual cam shaft A1 and A2, which satisfy the relationship of A1.ltoreq.A&lt;A2 as to the rotation position information A of the virtual cam shaft, are first retrieved from the cam geometry data table in FIG. 30 (S1630). Then, the operation values of the cam movement corresponding to the position addresses within one revolution A1 and A2 are obtained from the cam geometry data table in FIG. 30 and are defined as D1 and D2 (S1631). The movement value D of the cam corresponding to the rotation position information A of the virtual cam shaft is calculated from the position addresses within one revolution A1 and A2 and the movement valued D1 and D2 of the cam by the following expression (S1632): EQU D=D1+(D2-D1).times.{(A-A1)/(A2-A1)}
This expression makes a proportional distribution calculation on the basis of the position addresses within one revolution since the movement values of the cam stored in the cam geometry data table have discrete values with respect to the position addresses within one revolution of the virtual cam shaft.
From the movement value of the cam D corresponding to the rotation position information of the virtual cam shaft found in the procedure shown in FIG. 32 and the stroke set value hi and stroke minimum limit position set value h2 stored beforehand in the variable area, the positioning value for continuous reciprocating cam movement is calculated by the following expression (S1623 in FIG. 31): EQU (h1.times.D)+h2
This is a reciprocating motion between the minimum limit position h2 and maximum limit position (h1+h2) of the cam movement. The positioning value found is output to the output axis (S1624) and transferred to the output module connected next to the output axis to drive the servo motor.
A third conventional example will now be described. FIGS. 34 to 38 show a conventional virtual transmission module equivalent to a cam (hereinafter referred to as the "virtual cam module") which was defined in Japanese Laid-Open Patent Publication No. HEI05073147. FIG. 34 illustrates the virtual cam module, wherein 600 indicates an input axis, 601 designates an auxiliary input. axis, 602 denotes an output axis, 620a represents a stroke set value h1, 620b indicates a stroke minimum limit position set value h2, 620c designates an update address h4 of the virtual cam shaft where the stroke of the cam is updated, and 604 denotes a black box which contains a function (procedure).
FIG. 35 is a memory map showing how a cam geometry data table is stored into the program memory, wherein 605 indicates position addresses within one revolution of the virtual cam shaft, and 621 represents movement values of a cam corresponding to said position addresses.
Since the change of the stroke during the cam movement operation requires the set value to be imported at the stroke bottom dead center, the position address within one revolution of the virtual cam shaft corresponding to the stroke bottom dead center is defined as the update address 620c of the virtual cam shaft at which the stroke of the cam movement is updated (180.degree. in the example of FIG. 35).
FIG. 36 is a flowchart which represents the function (procedure) included in the black box 604.
FIG. 37 is a memory map showing how the virtual cam module is stored into the program memory, wherein 610 indicates a module number and 611 designates connection information which is operative to refer to the position address of the input axis. 612 denotes auxiliary input axis connection information which is operative to refer to the position address of the auxiliary input axis. 630 represents arithmetic expressions which are used to find a positioning value output to the output axis 602 and into which the function (procedure) shown in the flowchart of FIG. 36 is stored. 632 indicates a variable area where the stroke set value 620a, the stroke minimum limit position set value 620b and the update address 620c of the virtual cam shaft where the stroke of the cam movement is updated are stored.
FIG. 38 is a memory map of the work memory used to find the positioning value output to the output axis 602. 632 indicates stroke data.
Operation will now be described. The virtual cam module shown in FIG. 34 has the position address of the input axis 600 as a main input and the position address of the auxiliary input axis 601 as an auxiliary input. A position address from the other virtual mechanical module is entered into the input axis 600 as the rotation position information of the virtual cam shaft. Also, the command address of the operation described in a conventional form of positioning program is entered into the auxiliary input axis 601 as an offset value to compensate for the rotation position information of the virtual cam shaft entered from the input axis 600.
From these inputs, the stroke set value 620a, the stroke minimum limit position set value 620b and the update address 620c of the virtual cam shaft where the stroke of the cam movement is updated, which are stored beforehand in the variable area, and the cam geometry data table stored in the program memory 9 as shown in FIG. 34, the virtual cam module calculates a positioning value for reciprocating cam movement and outputs the result of calculation to the output axis 602. The positioning value output for the reciprocating cam movement is transferred to the output module connected next to the output axis to drive the servo motor.
The way of calculating the positioning value output for reciprocating cam movement, which is included in the black box as the function (procedure), will now be described with reference to the flowchart in FIG. 36.
In FIG. 36, the position address x of the input axis and the position address z of the auxiliary input axis are first imported (S1640), and the sum thereof is then converted into the position address within one revolution (S1641). The position address within one revolution is represented by a remainder which is obtained by dividing the sum of the position address of the input axis and the position address of the auxiliary input axis by a one-revolution value (360.degree.). The value thus found is the rotation position information of the virtual cam shaft.
Then, it is judged whether or not the rotation position information of the virtual cam shaft has exceeded the update address 620c of the virtual cam shaft at which the stroke of the cam movement is updated (S162). If the information has exceeded the address, the stroke set value 620a in the variable area set from the external device is updated to be the stroke data 602 in the work memory 10. If the information has not exceeded the address, the stroke data 632 is not updated.
Subsequently, the movement value of the cam corresponding to the rotation position information of the virtual cam shaft is found with reference to the cam geometry data table (S1644). This procedure has already been described in FIG. 32.
From the determined movement value of the cam D corresponding to the rotation position information of the virtual cam shaft, the stroke data F in the work memory 10, and the stroke minimum limit position set value h2 stored beforehand in the variable area, the positioning value for continuous reciprocating cam movement is calculated by the following expression (S1645 in FIG. 36): EQU (F.times.D)+h2
This is a reciprocating motion between the minimum limit position (F+h2) of the cam movement and this stroke F is updated per stroke even during the cam movement operation. The positioning value found is output axis (S1646) and transferred to the output module connected next to the output axis to drive the servo motor.
A fourth conventional example will now be described with reference to the drawings. FIG. 39 shows the operation of this conventional example. In this drawing, 762 indicates a cam pattern, 763a, 763b and 763c represent limit output patterns, 764a denotes point 1, 764b designates point 2, 764c indicates point 3, 764d denotes point 4, and similarly, 764e represents point n-1 and 764f designates point n, 765a indicates interval 0 from a stroke minimum limit value at the actual current value of a cam to point 1, 765b designated interval 1 from point 1 at the actual current value of the cam to point 2, 765c denotes interval 2 from point 2 at the actual current value of the cam to point 3, 765d indicates interval 3 from point 3 at the actual current value of the cam to point 4, and similarly, 765e represents interval n-1 from point n-1 at the actual current value of the cam to point n and 765f indicates interval n from point n at the actual current value of the cam to a stroke maximum limit value, and 766a, 766b, 766c, 766d, 766e, 766f, 766g, 766h, 766i, 766j, 766k and 7661 designate limit output ON/OFF points on the cam pattern, indicating limit output states in which ON and off signals are output to the outside in response to the actual current values of the cam.
Namely, the limit output is ON in the ranges point 766a to point 766b and point 766k to point 7661 of the limit output pattern 1, in the ranges point 766c to point 766d and point 766i to point 766j of the limit output pattern 2, and in the ranges point 766e to point 766f and point 766g to point 766h of the limit output pattern 3.
The above operation may be applied to a filling machine. For example, it may be assumed that the pushing-up (vertical) operation of bottles, packages, etc. is controlled according to a cam pattern on a filling machine, that a filling nozzle is initially lowered at the position of the bottle, package or the like, and that the nozzle is raised according to a filling amount. If a limit switch output signal is provided at the position of a vertical axis to lower the filling nozzle, the output signal is given when the vertical axis rises (e.g., at point 766a of the limit output pattern 1 in FIG. 39) and also when the vertical axis lowers (e.g. at point 766k of the limit output pattern 1 in FIG. 39) because the limit switch output is provided at the actual current value of the vertical axis (stroke by the cam). In this example of the filling machine, the limit switch output signal must not be provided when the vertical axis lowers and measures must be taken to give a limit switch output disable command, for example, during the lowering period of the vertical axis under the control of a user sequence program. Also, when the shape of an object filled changes, the cam pattern must be changed. Since the operation range (stroke range) of the vertical axis changes accordingly, the setting of the limit switch output pattern must also be changed.